
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html">

<h:body style="background-color:#CCEBCC">
	<h:form>
		<p style="background-color: #B870FF"></p>
		<center>
		<p style="background-color: #B870FF">
		<h1>Rezultate chestionar</h1>
		</p>
		</center>
		<div align="right"><h:commandButton value="Back"
			action="#{rezultateChBean.back}"></h:commandButton></div>
		<br />
		<div>

		<h2 style="color: Aqua; background-color: Navy"><h:outputText
			value="Chestionar: #{rezultateChBean.chestionar.nume}" /></h2>
		</div>
		<br />

		<ui:repeat value="#{rezultateChBean.chestionar.intrebari}"
			var="intrebare" varStatus="index">
			<h:panelGrid columns="1">
				<h:outputText value="#{index.index+1}. #{intrebare.text}" />
				<i> <h:commandLink rendered="#{intrebare.tip == 1}"
					value="Raspunsuri (#{intrebare.nrRaspunsuri})"
					action="#{rezultateChBean.afiseazaRaspunsuri}">
					<f:param name="intrebareSelected" value="#{intrebare.id}" />
				</h:commandLink> </i>
				<ui:repeat value="#{intrebare.optiuni}" var="optiune"
					rendered="#{intrebare.tip == 2}"
					action="#{rezultateChBean.afiseazaRaspunsuri}"
					layout="lineDirection">
					<h:panelGrid columns="2">
						<h:outputText rendered="#{!optiune.e_cu_comentariu}"
							value="#{optiune.text} #{optiune.procentaj}" />

						<h:commandLink rendered="#{optiune.e_cu_comentariu}"
							value="#{optiune.text}"
							action="#{rezultateChBean.afiseazaRaspunsuri}">
							<f:param name="intrebareSelected" value="#{intrebare.id}" />
						</h:commandLink>

					</h:panelGrid>

				</ui:repeat>

				<ui:repeat value="#{intrebare.optiuni}" var="optiune"
					rendered="#{intrebare.tip == 3}"
					action="#{rezultateChBean.afiseazaRaspunsuri}"
					layout="lineDirection">
					<h:panelGrid columns="2">
						<h:outputText rendered="#{!optiune.e_cu_comentariu}"
							value="#{optiune.text} #{optiune.procentaj}" />

						<h:commandLink rendered="#{optiune.e_cu_comentariu}"
							okvalue="#{optiune.text}"
							action="#{rezultateChBean.afiseazaRaspunsuri}">
							<f:param name="intrebareSelected" value="#{intrebare.id}" />
						</h:commandLink>
					</h:panelGrid>
				</ui:repeat>
			</h:panelGrid>
		</ui:repeat>
		<br />
		<br />
		<center><h:commandButton value="OK"
			style="font-family:Georgia; font-size:100%; height: 36px; width: 256px; "
			align="top" action="#{rezultateChBean.back}"></h:commandButton></center>
	</h:form>
</h:body>
<p style="background-color: #B2FEE1"></p>

</html>
